package com.powersystem.demo.controller;


import com.powersystem.demo.entity.PsRolePremission;
import com.powersystem.demo.mapper.PsRolePremissionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author linrongji
 * @since 2019-11-14
 */
@RestController
public class PsRolePremissionController {
    @Autowired
    private PsRolePremissionMapper psRolePremissionMapper;

    @RequestMapping("addPsRolePremission")
    public int addPsRolePremission(PsRolePremission pfr){
        return psRolePremissionMapper.insert(pfr);
    }

    @RequestMapping("delePsRolePremission")
    public int delePsRolePremission(int id){

        return psRolePremissionMapper.deleteById(id);
    }
    @RequestMapping("upPsRolePremission")
    public int upPsRolePremission(PsRolePremission pfr){
        return psRolePremissionMapper.updateById(pfr);
    }

    @RequestMapping("PsRolePremissionById")
    public PsRolePremission PsRolePremissionById(int id) {

        return psRolePremissionMapper.selectById(id);
    }
}

